document.onreadystatechange = function(){
    if(document.readyState == 'complete'){
        return true
    }else{
        return false
    }
}